<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>简途旅行</title>
    <meta name="format-detection" content="telephone=no" />
    <meta name="wap-font-scale" content="no">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="/old/css/beauty/index.scss?__inline">
</head>
<body>
<div class="page-group" style="visibility: hidden">
    <div class="page page-current">
        <div data-toggle="scroller" data-type="js" class="page-content content infinite-scroll infinite-scroll-bottom" data-distance="30">
            <img class="head-img" src="/old/images/beauty/header.png">
            <div class="head-button">
                <a href="/join">我要参加</a>
                <a href="/activities">活动详情</a>
            </div>
            <img class="rank" src="/old/images/beauty/rank.png">
            <div class="list">
                <div class="list-item">
                    <a href="/detail">
                        <div class="player-avatar">
                            <img src="http://images.simpletour.com/simpletour/images/wechat_home/de290568caba4eb385465b9e828ee7d1.png!middle320" alt="">
                        </div>
                    </a>
                    <p>
                        <span>昵称: </span>
                        <span>还都是大四</span>
                    </p>
                    <p>
                        <span>宣言:</span>
                        <span>李老师说最多100100100100100100100100100100100100100字李老师说最多100字李老师说最多100字李老师说最多100字李老师说最多100字李老师说最多100字李老师说最多100字李老师说最多100字李老师说最多100字</span>
                    </p>
                    <div class="star-count">
                        点赞数: 1234
                        <div class="player-rank">
                            <img src="/old/images/beauty/price-icon.png" alt="">
                            第123名
                        </div>
                    </div>
                    <div class="btn-group">
                        <a class="star-btn">赞一个</a>
                        <a href="/detail">说两句</a>
                    </div>
                    <div class="border-bottom">
                        <img src="/old/images/beauty/border-bottom.png" alt="">
                    </div>
                </div>

                <div class="list-item">
                    <a href="/detail">
                        <div class="player-avatar">
                            <img src="http://images.simpletour.com/simpletour/images/wechat_home/0cbe057209e2aa5b4b1acb16cbd1cfd2.png!middle320" alt="">
                        </div>
                    </a>
                    <p>
                        <span>昵称: </span>
                        <span>还都是大四</span>
                    </p>
                    <p>
                        <span>宣言: </span>
                        <span>100100100100100100100100100100100100100000</span>
                    </p>
                    <div class="star-count">
                        点赞数: 1234
                        <div class="player-rank">
                            <img src="/old/images/beauty/price-icon.png" alt="">
                            第123名
                        </div>
                    </div>
                    <div class="btn-group">
                        <a>赞一个</a>
                        <a href="/detail">说两句</a>
                    </div>
                    <div class="border-bottom">
                        <img src="/old/images/beauty/border-bottom.png" alt="">
                    </div>
                </div>
            </div>
            <div class="infinite-scroll-preloader">
                <div id="pullUp" class="">
                    <span class="pullUpIcon"></span><span class="pullUpLabel">下滑加载更多…</span>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/old/common/js/zepto.min.js"></script>
<script src="/old/common/common/js/base.js"></script>
<script src="/old/common/js/scroll.js"></script>
<script>
    (function (doc, win) {

        var docEl = doc.documentElement,
                resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                recalc = function () {
                    var clientWidth = docEl.clientWidth;
                    if (!clientWidth) return;
                    var style;
                    if (style = document.getElementById("forhtml")) {
                        style.parentNode.removeChild(style);
                    }
                    style = document.createElement("style");
                    style.id = "forhtml";
                    document.head.appendChild(style);
                    style.appendChild(document.createTextNode("html{font-size:" + 20 * (clientWidth / 375) + "px !important;}"));
                };
        recalc();
        doc.getElementsByClassName('page-group')[0].style.visibility = 'visible';
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
    $(document).ready(function() {
        $("a").tap(function(e) {
            e.preventDefault();
            if(!$(this).hasClass('star-btn')) {
                location.href = $(this).attr('href');
            }
        });

//        $.confirm({title:'我杨明昆永不背弃',detail:false,yes:'X'})
        /* ============================================
         **********   下拉加载更多  *********************
         ============================================== */
        var loading = false;
        function addItems(data) {
            var strPackage = '';
            $.each(data, function (i, v) {
                strPackage += '<div class="pkg-gp" data-href="/mobile/gateway/wechat/home/tourism/'+ v.id +
                        '"><div class="pkg-img">' +
                        '<img src="' + v.imgUrl + '" alt="">'+
                        '<div class="pkg-type"><ul>'+ strTips + '</ul></div><div class="triangle"></div>'+
                        '</div><div class="pkg-title">'+
                        '<div class="pkg-name">' + v.displayName + '</div>'+
                        '<div class="pkg-price">'+ v.bidPrice +'元</div></div>'+
                        '<div class="pkg-content">'+ v.packageDisplayName+ '</div></div>';
            });
            $('.recommend-pkg').append(strPackage);
            $.refreshScroller();
        }
        // 上次加载的序号
        var lastIndex = 1;
        // 注册'infinite'事件处理函数
//        $(document).on('infinite', '.infinite-scroll-bottom',function() {
//            // 如果正在加载，则退出
//            if (loading) return;
//            // 设置flag
//            loading = true;
//            $.ajax({
//                type: 'POST',
//                url: '/mobile/gateway/wechat/home/recommendmore',
//                data: {
//                    pageIndex: lastIndex,
//                    pageSize: 10
//                },
//                success: function (data) {
//                    var dataJson = JSON.parse(data);
//                    if (dataJson.code == 0) {
//                        if (dataJson.data.length == 0) {
//                            $('#pullUp .pullUpLabel').text('没有更多了…');
//                        } else {
//                            loading = false;
//                            addItems(dataJson.data);
//                            $('#pullUp .pullUpLabel').text('下滑加载更多…');
//                            lastIndex++;
//                        }
//                    } else if (dataJson.code == 2) {
//                        // 加载完毕，则注销无限加载事件，以防不必要的加载
//                        $.detachInfiniteScroll($('.infinite-scroll'));
//                        // 删除加载提示符
//                        $('.infinite-scroll-preloader').remove();
//                    }
//                },
//                error: function () {
//                    loading = false;
//                }
//            });
//        });

    });
</script>
</body>
</html>
